//统一管理咱们项目用户相关的接口
import request from "@/utils/request";
import type {
    HandleResponseData
} from "../../common/type";


import {LogInfoReponseData, LogListReponseData} from "@/api/sys/log/type";

//项目用户相关的请求地址
enum API {

    //用户列表
    logPageListUrl = "/bg/sysLog/pageList",
    //批量删除
    logBatchDelUrl = "/bg/sysLog/batchDel",
    //详情
    logInfoUrl = "/bg/sysLog/detail",
}

export const reqBatchDelLog = (batchDelLogForm: any) => request.post<any, HandleResponseData>(API.logBatchDelUrl,batchDelLogForm)


export const reqLogList = (page: number, pageSize: number,usernameLike: string, type: number,codeLike:string,startTime :string,endTime:string,requestId:string) =>
    request.get<any, LogListReponseData>(API.logPageListUrl+`?usernameLike=${usernameLike}&page=${page}
    &pageSize=${pageSize}&type=${type}&codeLike=${codeLike}&startTime=${startTime}&endTime=${endTime}&requestId=${requestId}`)

export const reqLogInfo = (id:number) => request.get<any, LogInfoReponseData>(API.logInfoUrl+`?id=${id}`)



